{% extends "./inc/base.html" %} {% block content %}




<!-- -->
			<section>
				<div class="container">
					<div class="row bg1x1">
					<!-- LEFT -->
					{% include "./inc/user_left.html" %}
					<!-- RIGHT -->
					<div class="col-lg-10 col-md-10 col-sm-8">
						<h4 class="page-header margin-top-0"><i class="fa fa-reorder fa-lg text-default"></i>
							{{controller.meta_title}}</h4>
						<div class="panel panel-default margin-bottom-20">
							<div class="panel-body">
								<a class="btn btn-success btn-xs pull-right " >提现</a>
								<a class="btn btn-danger btn-xs pull-right" data-toggle="ajaxModal" href="/center/account/recharge" id="recharge">充值</a>
								账户余额：￥<span class="text-danger size-25">{%if userInfo.amount %}{{userInfo.amount|formatCurrency}}{%else%}0.00{%endif%}</span>
							</div>
						</div>
						<ul class="nav nav-tabs nav-bottom-border">
							<li {%if type == null%}class="active"{%endif%}><a href="/center/account">
								交易记录</a></li>
							<li {% if type == 2%}class="active"{%endif%}><a href="/center/account/index/?type=2" ><span class="badge badge-red btn-xs badge-corner">{{unpaid}}</span>充值订单</a></li>
							<li {% if type == 1%}class="active"{%endif%}><a href="/center/account/index/?type=1" >提现申请记录</a></li>

						</ul>
						<div class="table-responsive" style="margin-top: -1px">
							{%if type == null%}
							<table class="table table-hover  table-vertical-middle">
								<thead>
								<tr><th >时间</th><th>存入 / 取出</th><th>余额</th><th>备注</th></tr>
								</thead>
								<tbody>
								{%for item in list %}
								<tr>
									<td >{{item.time|dateformat('Y-m-d H:i:s')}}</td>
									<td>{{item.amount|formatCurrency}}</td>
									<td>{{item.amount_log|formatCurrency}}</td>
									<td>{{item.note}}</td>
								</tr>
								{%endfor%}

								</tbody>
							</table>
							{%elif type == 1%}
							<table class="table table-hover  table-vertical-middle">
								<thead>
								<tr><th >时间</th><th>提现金额</th><th>名称</th><th>账号</th><th>状态</th></tr>
								</thead>
								<tbody>
								{%for item in list %}
								<tr>
									<td >{{item.time|dateformat('Y-m-d H:i:s')}}</td>
									<td>{{item.amount|formatCurrency}}</td>
									<td>{{item.amount_log|formatCurrency}}</td>
									<td>{{item.note}}</td>
									<td>{{item.note}}</td>
								</tr>
								{%endfor%}

								</tbody>
							</table>
							{%else%}
							<table class="table table-hover  table-vertical-middle">
								<thead>
								<tr><th >订单号</th><th>充值金额</th><th>支付方式</th><th>创建时间</th><th>状态</th><th>操作</th></tr>
								</thead>
								<tbody>
								{%for item in list %}
								<tr>
									<td >{{item.order_no}}</td>
									<td class="text-danger">{{item.order_amount|formatCurrency}}</td>
									<td>{{item.channel}}</td>
									<td>{{item.create_time|dateformat('Y-m-d H:i:s')}}</td>
									<td>{%if item.pay_status == 0%}未支付{%else%}已支付{%endif%}</td>
									<td>{%if item.pay_status == 0%}<a class="btn btn-danger btn-xs" href="/center/pay/pay/?order={{item.id}}" target="_blank"><i class="fa fa-credit-card white"></i>立即付款 </a>
										{%else%}
										<a class="btn btn-default btn-xs pull-right nomargin confirm ajax-get" href="/center/order/delorder/?type=1&id={{item.id}}"><i class="fa fa-trash-o "></i>删除订单</a>
										{%endif%}
									</td>
								</tr>
								{%endfor%}

								</tbody>
							</table>
							{%endif%}
						</div>
						<!-- PAGINATION -->
						<div class="text-right">
							<!-- Pagination Default -->
							{{pagination | safe}}
							<!-- /Pagination Default -->
						</div>
						<!-- /PAGINATION -->
					</div>
					</div>
				</div>
			</section>
			<!-- / -->

{% endblock %}
{% block script %}
<script type="text/javascript" src="/static/assets/js/view/demo.shop.js"></script>
        {% endblock %}